import request from '@/utils/request'

// 评估列表
export function getAssess(query) {
  return request({
    url: '/surfaceRupture/page',
    method: 'get',
    params: query
  })
}

// 查看任务
export function detailAssess(query) {
  return request({
    url: '/Assess/viewAssess',
    method: 'get',
    params: query
  })
}

// 获取子任务
export function getSubAssess(query) {
  return request({
    url: '/preAssessAssess/getSubAssess',
    method: 'get',
    params: query
  })
}

// 新增任务
export function addAssess(query) {
  return request({
    url: '/preAssessAssess/save',
    method: 'post',
    data: query
  })
}

// 新增子任务
export function addSubAssess(query) {
  return request({
    url: '/preAssessAssess/saveSubAssess',
    method: 'post',
    data: query
  })
}

// 删除
export function delAssess(ids) {
  return request({
    url: '/surfaceRupture/delete',
    method: 'post',
    data:{
    	idList:ids
    }
  })
}

// 修改任务
export function updateAssess(query) {
  return request({
    url: '/Assess/update',
    method: 'post',
    data: query
  })
}


// 修改子任务
export function updateSubAssess(query) {
  return request({
    url: '/preAssessAssess/update',
    method: 'post',
    data: query
  })
}

// 分配小组
export function groupFp(query) {
  return request({
    url: '/preAssessAssess/assignGroup',
    method: 'post',
    data: query
  })
}

// 获取父编码
export function getAssessBian(query) {
  return request({
    url: '/preAssessAssess/AssessCode',
    method: 'get',
    params:query
  })
}

// 获取子编码
export function getSubAssessBian(query) {
  return request({
    url: '/preAssessAssess/subAssessCode',
    method: 'get',
    params:query
  })
}

// 获取父级省
export function getProvinceName(query) {
  return request({
    url: '/preAssessAssess/subAssessDistrict',
    method: 'get',
    params:query
  })
}

//地图获取全部任务信息列表
export function getAllAssessList() {
  return request({
    url: '/preAssessAssess/getParentAssess',
    method: 'get'
  })
}